package com.aspose.cells.a.d;

public class zcq {
   public static int a(int var0) {
      return (int)(a((long)var0) & 4294967295L);
   }

   public static long a(long var0) {
      return (var0 & 4294967295L & 255L) << 24 | (var0 & 4294967295L & 65280L) << 8 | (var0 & 4294967295L & 16711680L) >> 8 | (var0 & 4294967295L & 4278190080L) >> 24;
   }

   public static short a(short var0) {
      return (short)(b((int)var0) & '\uffff');
   }

   public static int b(int var0) {
      return (var0 & '\uffff' & 255) << 8 | (var0 & '\uffff' & '\uff00') >> 8;
   }

   public static void a(int var0, byte[] var1, int var2) {
      for(int var3 = 0; var3 < 4; ++var3) {
         var1[var2 + var3] = (byte)var0;
         var0 >>= 8;
      }

   }

   public static boolean b(long var0) {
      return (var0 & 1L) != 0L;
   }

   public static int a(long var0, int var2) {
      long var3 = var0 / (long)var2;
      if (var0 % (long)var2 != 0L) {
         ++var3;
      }

      return (int)var3;
   }

   public static int b(long var0, int var2) {
      return a(var0, var2) * var2;
   }

   public static void a(com.aspose.cells.b.a.d.zm var0, int var1) throws Exception {
      int var2 = b(var0.i(), var1);
      if (var0.h() < (long)var2) {
         var0.a((long)var2);
      }

      var0.b((long)var2);
   }

   public static void a(com.aspose.cells.b.a.d.zm var0, com.aspose.cells.b.a.d.zm var1) throws Exception {
      if (var0 == null) {
         throw new IllegalArgumentException("srcStream");
      } else if (var1 == null) {
         throw new IllegalArgumentException("dstStream");
      } else {
         byte[] var2 = new byte[4096];

         while(true) {
            int var3 = var0.a(var2, 0, var2.length);
            if (var3 == 0) {
               return;
            }

            var1.b(var2, 0, var3);
         }
      }
   }

   public static void a(String var0, com.aspose.cells.b.a.d.zm var1) throws Exception {
      com.aspose.cells.b.a.d.ze var2 = com.aspose.cells.b.a.d.zd.b(var0);

      try {
         a((com.aspose.cells.b.a.d.zm)var2, (com.aspose.cells.b.a.d.zm)var1);
      } finally {
         if (var2 != null) {
            var2.a();
         }

      }

   }

   public static boolean a(String var0) {
      return var0 != null && !"".equals(var0);
   }

   public static void a(String var0, String var1) {
      if (!a(var0)) {
         throw new IllegalArgumentException("The argument cannot be null or empty string.\\r\\nParameter name: \"" + var1);
      }
   }

   public static int a(double var0) {
      return (int)com.aspose.cells.b.a.zq.a(var0);
   }

   public static int a(char var0) {
      return var0 > '9' ? (var0 <= 'F' ? var0 - 65 : var0 - 97) + 10 : var0 - 48;
   }

   public static boolean b(char var0) {
      if (var0 >= '0' && var0 <= '9' || var0 >= 'A' && var0 <= 'F') {
         return true;
      } else if (var0 >= 'a') {
         return var0 <= 'f';
      } else {
         return false;
      }
   }

   public static boolean b(String var0, String var1) {
      return com.aspose.cells.b.a.zv.a(var0, var1, true) == 0;
   }

   public static boolean a(com.aspose.cells.b.a.b.zt var0, com.aspose.cells.b.a.b.zt var1, double var2) {
      if ((double)Math.abs(var0.b() - var1.b()) <= var2 && (double)Math.abs(var0.c() - var1.c()) <= var2) {
         return true;
      } else {
         return (double)Math.abs(var0.b() - var1.c()) <= var2 && (double)Math.abs(var0.c() - var1.b()) <= var2;
      }
   }
}
